﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Logging;
using ALog.Logging;
using System.Diagnostics;

namespace ALog_Prj
{
public  class ALogEntry :LogEntry
  {
   public ALogEntry()
    {
        if (LogHandler.IsDatabaseLoggingEnabled)
        {
            this.Categories.Add("DatabaseCategorySource");
        }

        if (LogHandler.IsRollingFileLoggingEnabled)
        {
            this.Categories.Add("RollingFileCategorySource");

        }

        if (LogHandler.IsEventFileLoggingEnabled)
        {
            this.Categories.Add("EventLogCategorySource");

        }

        if (LogHandler.IsEmailLoggingEnabled)
        {
            this.Categories.Add("EmailCategorySource");

        }

        if (LogHandler.IsXMLFileLoggingEnabled)
        {
            this.Categories.Add("XMLLogCategorySource");

        }

    }
   public ALogEntry(object message, string category, int priority, int eventId, System.Diagnostics.TraceEventType severity, string title, IDictionary<System.String, System.Object> properties)
       : base(message, category, priority, eventId, severity, title, properties)
   {
       
   }
   public ALogEntry(object message, ICollection<System.String> categories, int priority, int eventId, System.Diagnostics.TraceEventType severity, string title, IDictionary<System.String, System.Object> properties)
       : base(message, categories, priority, eventId, severity, title, properties)
   {
       
   }
     

   }
}
